package Dao;

import Dto.ArticleDTO;
import Dto.ArticleParamDto;
import entity.Article;
import entity.ArticleAttachment;

import java.sql.SQLException;
import java.util.List;

/**
 * @Author Su
 * @Date 2025/4/30 23:09
 * @Version 1.0 （版本号）
 */
public interface ArticleDAO {
    int createArticle(Article article) throws SQLException;
    ArticleDTO getArticleById(int id) throws SQLException;
    List<ArticleDTO> getArticlesByKnowledgeBase(int knowledgeBaseId) throws SQLException;
    boolean updateArticle(Article article) throws SQLException;
    boolean deleteArticle(int id) throws SQLException;
    boolean exists(int id) throws SQLException;
    List<ArticleAttachment> getAttachmentsByArticle(int articleId) throws SQLException;
    List<ArticleDTO> getAllArticles(int currentUserId, ArticleParamDto articleParam) throws SQLException;
}